package com.bawei.imageload

import android.widget.ImageView
import com.bawei.imgload.R

/**
 * @author ZhangRuiPeng
 * @description:
 */
class ImageLoad {

    companion object{
        private val imgLoad : ImageLoad by lazy(LazyThreadSafetyMode.SYNCHRONIZED){
            ImageLoad()
        }

        fun getInstance():ImageLoad{
            return imgLoad

        }
    }

    fun loadMatchImg(img : ImageView, url : String){
        GlideApp.with(img.context)
            .load(url).centerCrop().thumbnail(0.1f)
            .error(R.drawable.share_img_not)
            .into(img)
    }
}